/*
La clase CPlantas nos mostrara segun la eleccion de su nombre
 * como se debe de usar y cuando usuarla
 */

/*
@author Cristina Carrillo
 * @version 1.00, 2/04/2011
 */
package vista;

/**
 *

 */
public class CPlants extends javax.swing.JFrame {

    /** Creates new form CPlants */
    public CPlants() {
        initComponents();
    }

    /** Los metodos son los radio button que estan en la ventana con
     * su respectivo nombre de cada planta
     * cada uno de estos metodos tiene como parametro un evento
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        rbManzanilla = new javax.swing.JRadioButton();
        rbRuda = new javax.swing.JRadioButton();
        rbEucalipto = new javax.swing.JRadioButton();
        rbLlanten = new javax.swing.JRadioButton();
        rbCedron = new javax.swing.JRadioButton();
        rbHierba = new javax.swing.JRadioButton();
        jLabel2 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jLabel3 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jPanel1 = new vista.CPanel1("f1.jpg");

        jLabel1.setFont(new java.awt.Font("Comic Sans MS", 1, 12));
        jLabel1.setText("Healing Plants");

        rbManzanilla.setFont(new java.awt.Font("Broadway", 1, 12));
        rbManzanilla.setText("CHAMOMILE");
        rbManzanilla.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbManzanillaActionPerformed(evt);
            }
        });

        rbRuda.setFont(new java.awt.Font("Broadway", 1, 12));
        rbRuda.setText("RUDA");
        rbRuda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbRudaActionPerformed(evt);
            }
        });

        rbEucalipto.setFont(new java.awt.Font("Broadway", 1, 12));
        rbEucalipto.setText("EUCALYPTUS");
        rbEucalipto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbEucaliptoActionPerformed(evt);
            }
        });

        rbLlanten.setFont(new java.awt.Font("Broadway", 1, 12));
        rbLlanten.setText("LLANTEN");
        rbLlanten.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbLlantenActionPerformed(evt);
            }
        });

        rbCedron.setFont(new java.awt.Font("Broadway", 1, 12));
        rbCedron.setText("CEDRON");
        rbCedron.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCedronActionPerformed(evt);
            }
        });

        rbHierba.setFont(new java.awt.Font("Broadway", 1, 12));
        rbHierba.setText("LEMON VERBENA");
        rbHierba.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbHierbaActionPerformed(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("Broadway", 1, 14));
        jLabel2.setText("NATURAL MEDICINE");

        jTextArea1.setBackground(new java.awt.Color(204, 204, 204));
        jTextArea1.setColumns(20);
        jTextArea1.setEditable(false);
        jTextArea1.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); // NOI18N
        jTextArea1.setRows(5);
        jTextArea1.setWrapStyleWord(true);
        jScrollPane1.setViewportView(jTextArea1);

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vista/Imagenes/020.png"))); // NOI18N

        jButton3.setFont(new java.awt.Font("Broadway", 1, 12));
        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vista/Imagenes/019.png"))); // NOI18N
        jButton3.setText("BACK");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton2.setFont(new java.awt.Font("Broadway", 1, 12));
        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vista/Imagenes/025.png"))); // NOI18N
        jButton2.setText("EXIT");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(53, 53, 53)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbRuda)
                            .addComponent(rbManzanilla)
                            .addComponent(rbEucalipto)
                            .addComponent(rbLlanten)
                            .addComponent(rbCedron)
                            .addComponent(rbHierba)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel3)))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 337, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(56, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(78, 78, 78)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(rbManzanilla)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbRuda)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbEucalipto)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rbLlanten)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rbCedron)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rbHierba))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addGap(144, 144, 144))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 336, Short.MAX_VALUE)))
                .addContainerGap())
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 179, Short.MAX_VALUE)
                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(39, 39, 39))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-840)/2, (screenSize.height-435)/2, 840, 435);
    }// </editor-fold>//GEN-END:initComponents

    private void rbManzanillaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbManzanillaActionPerformed
        // TODO add your handling code here:

        try {


            if (rbManzanilla.isSelected() == true) {
                //                JOptionPane.showMessageDialog(null, "\nDESCRIPCIÓN \nHierba de la familia de las compuestas,\n");
                jTextArea1.setText("\nDESCRIPTION \n" +
                        "Grass family of composite, weak stems about 30 cm. length;\n" +
                        "leaves plenty of games on line segments\nand fragrant flowers in solitary flower head with cente\nyellow and white circle.\n" +
                        " RecolecciónSe collect flowers from May\n" +
                        "August, sunshine, and dried in the shade.\n" +
                        "ART USED\n" +
                        "Dried flowers\n" +
                        "PROPERTIES\n" +
                        "Carminative, sedative, digestive, stomach, cleansing,\n" +
                        "menagogue, colagoga, anti-inflammatory.\n" +
                        "INDICATIONS\n" +
                        "Liver is used against colic\n" +
                        "fever, insomnia, rheumatism, eczema," +
                        "hemorrhoids and menstrual derangements.\n" +
                        "Facilitates digestion and stimulates the functions of the stomach.\n" +
                        " Effective as a disinfectant of oral diseases and processes\n" +
                        "inflammatory.\n" +
                        "USES\n" +
                        "Infusion, one teaspoon per cup, 3 times a day.\n  facials in the form of steam. For mouth sores,\n" +
                        "gargles and enemas, in cooking, 2 tablespoons per liter of water.");
                rbRuda.setSelected(false);
                rbCedron.setSelected(false);
                rbEucalipto.setSelected(false);
                rbHierba.setSelected(false);
                rbLlanten.setSelected(false);
            }



        } catch (Exception e) {
        }
}//GEN-LAST:event_rbManzanillaActionPerformed

    private void rbRudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbRudaActionPerformed
        // TODO add your handling code here:

        try {
            if (rbRuda.isSelected()) {
                jTextArea1.setText("DESCRIPTION \n" +
                        "Perennial plant of the Rutaceae family,\n" +
                        " with erect stems 60 to 80cm., leaves alternate, \n" +
                        "thick, oblong lobes, small flowers with four petals\n" +
                        " yellow, and capsular fruit with many black seeds.\n" +
                        "Collection\n" +
                        "Flowering tops are harvested when the leaves begin to open.\n" +
                        "Part used\n" +
                        "Leaves and flowering tops.\n" +
                        "Properties\n" +
                        "Emmenagogue, nontoxic, antispasmodic and vermifuge.\n" +
                        "Directions\n" +
                        "It is used to induce menstruation or to increase\n" +
                        " it. Combats nervous disorders, nervous breakdowns,\n" +
                        " cramps, convulsions and involuntary muscle contractions,\n" +
                        " and is suitable for the expulsion of intestinal worms (worms).\n" +
                        "Contraindications\n" +
                        "Because of its toxicity, if taken in excessive \n" +
                        "doses can cause abortion. Not be taken without medical consent.\n" +
                        "Applications\n" +
                        "Powder, 0.5 to 2 grams.\n" +
                        "In teas, half a teaspoon per cup.\n" +
                        "In essence and extract as enema. ");
                rbManzanilla.setSelected(false);
                rbCedron.setSelected(false);
                rbEucalipto.setSelected(false);
                rbLlanten.setSelected(false);
                rbHierba.setSelected(false);

            }


        } catch (Exception e) {
        }
}//GEN-LAST:event_rbRudaActionPerformed

    private void rbEucaliptoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbEucaliptoActionPerformed
        // TODO add your handling code here:
        if (rbEucalipto.isSelected()) {
            jTextArea1.setText("The eucalyptus trees are evergreen, upright carriage. \n" +
                    "They can reach over 60 m in height, while speaking of\n" +
                    " individuals who have disappeared already reached 150 meters.\n" +
                    " The outer crust (ritidome) is light brown skin that looks and \n" +
                    "appears to shreds leaving gray or brownish stains on the inner \n" +
                    "bark, smooth. Eucalypt forests may create problems due to\n" +
                    " wildfires reaching tall trees in a short time of growth and \n" +
                    "easy burning of wood: in dense forest of eucalyptus trees,\n" +
                    " the flames of a fire can reach over 300 meters height, \n" +
                    "as has been seen in Australia during the dry season (December-January).\n" +
                    "The young leaves of the eucalyptus trees are sessile, oval,\n" +
                    " gray, stretching and becoming leathery and a bright\n" +
                    " blue-green adult, contain an essential oil, balsamic \n" +
                    "vinegar its characteristic odor, which is a powerful \n" +
                    "natural disinfectant. In aromatherapy it is used because \n" +
                    " the emotional and despejante a stimulant effect, and the\n" +
                    " physical part as antiviral, expectorant and nasal decongestant..");
            rbCedron.setSelected(false);
            rbHierba.setSelected(false);
            rbLlanten.setSelected(false);
            rbManzanilla.setSelected(false);
            rbRuda.setSelected(false);

        }
}//GEN-LAST:event_rbEucaliptoActionPerformed

    private void rbLlantenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbLlantenActionPerformed
        // TODO add your handling code here:
        if (rbLlanten.isSelected()) {
            jTextArea1.setText("Scientific name: Plantago major\n" +
                    "Family: Plantaginaceae\n" +
                    "Vernacular or common name: Plantain\n" +
                    "Parts used: whole plant is used: roots, leaves and ears.\n" +
                    "Plant type: Herbaceous, perennial wild growth.\n" +
                    " It has no stems, leaves grow from the root.\n" +
                    "Active ingredients: tannins, acids phenolcarboxylic,\n" +
                    " mannitol and mucilage and other compounds.\n" +
                    "Soil type: Without further requirements, remember \n" +
                    "that grows wild.\n" +
                    "Therapeutic value, are many and varied. Mention a\n" +
                    " few: antibacterial and allergy, anti inflammatory,\n" +
                    "expectorant and others.Mode was used: in teas and \n" +
                    "syrups and domestic uses, mouthwashes, poultices and\n" +
                    " eye bath and externally.");
            rbCedron.setSelected(false);
            rbEucalipto.setSelected(false);
            rbHierba.setSelected(false);
            rbManzanilla.setSelected(false);
            rbRuda.setSelected(false);

        }
}//GEN-LAST:event_rbLlantenActionPerformed

    private void rbCedronActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCedronActionPerformed
        // TODO add your handling code here:
        if (rbCedron.isSelected()) {
            jTextArea1.setText("As medical\n" +
                    "In herbal leaves and stems of lemon verbena are\n" +
                    " rich in essential oil, whose main component citral, \n" +
                    "responsible for its aroma, and including limonene,\n" +
                    " linalool, cineol, terpineol and caryophyllene,\n" +
                    " a sesquiterpene aldehyde which accounts action eupéptica and spasmolytic.\n" +
                    "Its infusion-performed with between 5 and 20 g per liter,\n" +
                    " is used as a digestive, carminative and antispasmodic, in \n" +
                    "case of indigestion or stomach pains. It also consumes mild \n" +
                    " sedative. Has a significant amount of melatonin, a \n" +
                    "used as a natural relaxant that promotes sleep at night. \n" +
                    "The elements used in infusion are collected twice a year,\n" +
                    "in late spring and early fall. Used the young leaves and \n" +
                    "flowering tops.\n" +
                    "Gastronomy\n" +
                    "Dried and chopped leaves are used in marinades, dressings\n" +
                    "and sauces to add a touch of citrus scent. She also is made ​​with aromatic sorbet.");
            rbEucalipto.setSelected(false);
            rbHierba.setSelected(false);
            rbLlanten.setSelected(false);
            rbManzanilla.setSelected(false);
            rbRuda.setSelected(false);

        }
}//GEN-LAST:event_rbCedronActionPerformed

    private void rbHierbaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbHierbaActionPerformed
        // TODO add your handling code here:
        if (rbHierba.isSelected()) {
            //            jLabel2.setIcon("vista/Imagenes")
            jTextArea1.setText("Internal use\n" +
                    "Carminative: Very useful for expelling digestive\n" +
                    " gas, bloating and avoiding aerophagia. \n" +
                    "(Infusion of a spoonful of dried leaves per\n" +
                    "cup of water. Two cups a day)\n" +
                    "Stomach: To aid digestion or weak or nervous stomach,\n" +
                    "exerts a stomach tonic, digestive and calming, \n" +
                    "preventing spasms and dyspepsia - indigestion \n" +
                    "accompanied by gas, feeling of vomiting and heartburn \n" +
                    "- The borneol and limonene are responsible for this \n" +
                    "last property. (Infusion of a spoonful of dried leaves \n" +
                    "per cup of water. Three cups a day, after eating)\n" +
                    "Bad breath: When you have the tendency to have halitosis\n" +
                    " or bad breath is very useful to rinse with the infusion \n" +
                    "of a spoonful of dried leaves and flowers per cup of water.\n" +
                    "Respiratory system: The infusion of a spoonful of dried \n" +
                    "leaves and flowers is beneficial for respiratory conditions,\n" +
                    " especially to expel the mucus, thus acting in an expectorant.\n" +
                    " Similarly, the same preparation is suitable for combating coughs.\n" +
                    "Relaxation: It is very appropriate infusion of lemongrass to\n" +
                    " relax and tone the nerves.");
            rbCedron.setSelected(false);
            rbEucalipto.setSelected(false);
            rbLlanten.setSelected(false);
            rbManzanilla.setSelected(false);
            rbRuda.setSelected(false);

        }
}//GEN-LAST:event_rbHierbaActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jButton3ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        dispose();
}//GEN-LAST:event_jButton2ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new CPlants().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JRadioButton rbCedron;
    private javax.swing.JRadioButton rbEucalipto;
    private javax.swing.JRadioButton rbHierba;
    private javax.swing.JRadioButton rbLlanten;
    private javax.swing.JRadioButton rbManzanilla;
    private javax.swing.JRadioButton rbRuda;
    // End of variables declaration//GEN-END:variables
}
